-
-
Notifications
You must be signed in to change notification settings - Fork 828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for device dehydration v2 #12316
Conversation
Correct, because even just launching the app would hit like 30% overall test coverage without any useful assertions |
src/utils/device/dehydration.ts
Outdated
* Dehydration can only be enabled if encryption is available, and the crypto | ||
* backend supports dehydration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Dehydration can only be enabled if encryption is available, and the crypto | |
* backend supports dehydration. | |
* Note that this doesn't necessarily mean that device dehydration has been initialised | |
* (yet) on this client; rather, it means that the server supports it, the crypto backend | |
* supports it, and the application configuration suggests that it *should* be | |
* initialised on this device. |
src/stores/SetupEncryptionStore.ts
Outdated
|
||
await initializeDehydration(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I suggest you make an issue about it if you don't expect to have it done in very short order.
As @t3chguy implies: I'm afraid you'll need to write jest tests to get the coverage up. Hopefully it should be pretty easy. |
Yup, I'll try to write some stuff to make SonarCloud happy |
src/stores/SetupEncryptionStore.ts
Outdated
|
||
await initializeDehydration(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@uhoreg Did you get a chance to make an issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. The tests look very comprehensive!
test/components/views/settings/tabs/user/SessionManagerTab-test.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This seems to have bypassed labs but relies on experimental MSC implementations, this is quite unexpected |
It has to be enabled on the server by editing the |
Sure, that's why we support setting labs flags in config.json - normally the product policy is to not release things relying on unstable APIs without product sign off |
Rehydrates/dehydrates device if dehydration is enabled in
.well-known
file (or if there is a dehydration key in SSSS). (Currently, js-sdk only supports dehydration when using Rust crypto.)Dehydrated devices are hidden or displayed specially when they are cross-signed, and if there is only one. Otherwise, they are displayed as normal devices.
Checklist
public
/exported
symbols have accurate TSDoc documentation.